<template>
  <div class="home">
    <ChartTop :chartData="chartData"></ChartTop>
    <ChartMain></ChartMain>
    <ChartFooter></ChartFooter>
  </div>
</template>

<script setup lang="ts">
  // 引入请求函数
  import { reqChartData } from '@/api/home/home';
  import {onMounted ,ref} from 'vue'
import ChartTop from './ChartTop/index.vue'
import ChartMain from './ChartMain/index.vue'
import ChartFooter from './ChartFooter/index.vue'
// 定义存储可视化数据
let chartData = ref({})
  
  // 测试mock数据能否获得
  onMounted(async () => {
    let result = await reqChartData()
    chartData.value=result
  })

</script>

<style scoped>
.home{
  width:100%;
  height: 100%;
}
</style>